package com.iven.xie.designpattern.builder;

/**
 * @author xiezhendong
 * @data 2021/7/30
 */
public class Director {
    private Builder mBuilder = null;

    public Director(Builder builder) {
        mBuilder = builder;
    }

    public Computer construct() {
        mBuilder.buildCpu();
        mBuilder.buildMainBoard();
        mBuilder.buildHardDisk();
        return mBuilder.getComputer();
    }
}
